import { Form } from 'antd-mobile'
// import style from './BaseFormStyle.module.sass'
import ChooseInput from '../../../../../../components/choose/ChooseInput'
import { useSelector } from 'react-redux'
import type { ReceptionSlice } from '../../../../../../type/ReceptionSlice'


function BaseForm () {

  // #region 变量声明
  const { baseInfo } = useSelector((state: { reception: ReceptionSlice }) => state.reception)
  // #endregion

  // #region 函数

  // #endregion

  // #region Hooks

  // #endregion

  return (
    <div>
      <Form layout='horizontal'>
        <Form.Item label='制单人'>
          <ChooseInput hasBack={ false }>
            { (!baseInfo.producer.groupName && !baseInfo.producer.name)
                ? <div style={{ color: '#ccc' }}>请选择</div>
                : <>
                    <div>
                      { baseInfo.producer.groupName }
                    </div>
                    <div>
                      { baseInfo.producer.name }
                    </div>
                  </> }
          </ChooseInput>
        </Form.Item>
      </Form>
    </div>
  )
}

export default BaseForm
